package com.weimob.mcloud.wechatwork.customer.domain.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author benben.li01
 * @date 2021/7/11
 * @since v5.12
 */
@AllArgsConstructor
@NoArgsConstructor
@Getter
public enum ExternaluserEventV2Enum {
    /**
     * 外部联系人变更相关事件枚举
     */
    ADD(1, "add",  "原始添加外部联系人消息", "addExternaluserHandlerV2"),
    ADD_BIZ(2, "add_biz",  "添加外部联系人（业务）", "addExternaluserBizHandlerV2"),
    ADD_SYNC(3, "add_sync",  "添加外部联系人（同步历史）", "addExternaluserSyncHandlerV2"),
    ;

    private Integer code;
    private String event;
    private String desc;
    private String implClassName;


    public static String getClassNameByEvent(String event) {

        for (ExternaluserEventV2Enum value : ExternaluserEventV2Enum.values()) {
            if(value.getEvent().equals(event)){
                return value.getImplClassName();
            }
        }
        return "";
    }
}
